From 6dcde2b8bdc714f3bb4e4c7e8a6ce9e3286164e5 Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Mon, 9 Jan 2006 17:16:10 +0000 Subject: [PATCH] bug: freeing non-malloced string --- gpsbabel/google.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gpsbabel/google.c b/gpsbabel/google.c index 9b9de4417..1f82c9f95 100644 --- a/gpsbabel/google.c +++ b/gpsbabel/google.c @@ -243,16 +243,6 @@ void goog_poly_e( const char *args, const char **unused ) } } - if ( encoded_points ) - { - xfree( encoded_points ); - encoded_points = NULL; - } - if ( encoded_levels ) - { - xfree( encoded_levels ); - encoded_levels = NULL; - } } static void @@ -283,6 +273,16 @@ google_read(void) xml_deinit(); xml_init( NULL, google_map, NULL ); xml_readstring( xml ); + if ( encoded_points ) + { + xfree( encoded_points ); + encoded_points = NULL; + } + if ( encoded_levels ) + { + xfree( encoded_levels ); + encoded_levels = NULL; + } } } else if ( dict ) { -- 2.30.2